package cn.caplike.demo.spring.bean.lifecycle.custom.init.and.destroy.method;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Main App
 *
 * @author LiKe
 * @version 1.0.0
 * @date 2020-03-31 17:47
 */
public class Client {

    public static void main(String[] args) {
        AbstractApplicationContext context3 =
                new ClassPathXmlApplicationContext("bean-custom-init-and-destroy-method.xml");
        BookCustomBean bookCustomBean = (BookCustomBean) context3.getBean("customLifeCycleBookBean");
        System.out.println("BookCustomBean: " + bookCustomBean);
        context3.registerShutdownHook();
    }
}
